package com.acwer.drools.dao;

import java.util.List;

import org.apache.ibatis.annotations.Select;
import org.springframework.stereotype.Repository;

import com.acwer.drools.domain.BenchMark;
import com.acwer.drools.domain.Jbbm20;
import com.acwer.drools.domain.Ssbm20;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;

@Repository
public interface Ssbm20Dao extends BaseMapper<Ssbm20>{
	@Select({ "<script>", 
		"select TOP 6 * from SSBM20 where SSBM LIKE concat('%',#{parm},'%') OR SSMC LIKE concat('%',#{parm},'%') OR PYJM LIKE concat('%',#{parm},'%') order by  length(PYJM),length(SSBM ) ,length(SSMC )  ASC" ,"</script>"
		})
	public List<Ssbm20> getJbbm20(String  parm);
	
	@Select({ "<script>", 
		"select * from SSBM20", 
		"where   SSBM in",
			"<foreach collection='list' open='(' close=')' item='id' index='i' separator=','>", "#{id}", "</foreach>",
			"</script>" 
		})
	public List<Ssbm20> getSsbm20s(List<String> bms);
}
